<?php

/**
 * gadget actions.
 *
 * @package    LYPO
 * @subpackage gadget
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 9301 2008-05-27 01:08:46Z dwhittle $
 */
class gadgetActions extends sfActions
{
	/**
	 * Executes index action
	 *
	 * @param sfRequest $request A request object
	 */
	public function executeIndex($request)
	{
		$this->setLayout(false);
		/* @var $response sfWebResponse */
		$response = $this->getResponse();
		$this->basehost = $request->getHost();
		$this->container = $request->getParameter('container','generic');
		$response->setContentType('text/xml');
	}


	public function executeCss(sfWebRequest $request)
	{
		$this->setLayout(false);
		/* @var $response sfWebResponse */
		$response = $this->getResponse();
		$response->setContentType('text/css');
		$request->setRequestFormat('css');
		$this->basehost = $request->getHost();
	}


	public function executeJs(sfWebRequest $request)
	{
		$this->setLayout(false);
		/* @var $response sfWebResponse */
		$response = $this->getResponse();
		$this->container = $request->getParameter('container','generic');
		$response->setContentType('application/x-javascript');
		$this->basehost = $request->getHost();
	}
	
	public function executeOauthjs(sfWebRequest $request)
	{
		$this->setLayout(false);
		/* @var $response sfWebResponse */
		$response = $this->getResponse();
		$response->setContentType('application/x-javascript');
		$this->basehost = $request->getHost();
	}	
	

	public function executeOauthtest(sfWebRequest $request)
	{
		$this->setLayout(false);
		$this->getResponse()->setContentType('text/xml');
	}

}
